package com.clive.service.impl;

import java.util.Date;
import java.util.List;

import com.clive.bean.DishesCategory;
import com.clive.dao.DishesCategoryDao;
import com.clive.dao.impl.DishesCategoryDaoimpl;
import com.clive.service.DishesCategoryService;
	
public class DishesCategoryServiceimpl implements DishesCategoryService {
	private DishesCategoryDao categoryDao = new DishesCategoryDaoimpl();
	public boolean addDishesCategory(DishesCategory dishesCategory) {
		dishesCategory.setStatus(1);
		Date date = new Date();
		dishesCategory.setCreated(date);
		dishesCategory.setUpdated(date);
		int i = categoryDao.addDishesCategory(dishesCategory);
		if (i<=0) {
			return false;
		}
		return true;
	}

	public boolean deleteDishesCategory(Integer dishesCategoryId) {
		// TODO Auto-generated method stub
		return false;
	}

	public boolean updateDishesCategory(DishesCategory dishesCategory) {
		// TODO Auto-generated method stub
		return false;
	}

	public List<DishesCategory> findDishesCategoryAll() {
		List<DishesCategory> list = categoryDao.findDishesCategoryAll();
		return list;
	}
	
}
